package com.ileaf.java8;

import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

/**
 * @author Lianlb
 * @version 2019-04-10 11:23
 */
public class LocalDate {
    public static ZoneId defaultZoneId() {
        return ZoneId.systemDefault();
    }

    public static void main(String[] args) {
        System.out.println(defaultZoneId());
        java.time.LocalDate now = java.time.LocalDate.now();
        System.out.println(now);
        System.out.println("生日 " + now.format(DateTimeFormatter.ofPattern("MM-dd")));
        System.out.println("生日 " + now.format(DateTimeFormatter.ofPattern("MM")));
    }
}
